<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.Map" %>
<%@ page import="java.util.List" %>
<%@ page import="com.zjm.jstl.pojo.Person" %>
<%@ page import="java.util.HashMap" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: ZJM
  Date: 2024/4/21
  Time: 22:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <title>Title</title>
</head>
<body>
<c:forEach begin="1" end="10" var="i">
  ${i}
</c:forEach>

<%
  List<Person> personList = new ArrayList<>();
  ArrayList<String> cities = new ArrayList<>();
  cities.add("北京");
  cities.add("上海");
  cities.add("广东");
  Map<String, Object> map = new HashMap<>();
  map.put("key1", "value1");
  map.put("key2", "value2");
  map.put("key3", "value3");
  personList.add(new Person("Alice", new String[]{"ywqyr", "afjfj"}, cities, map));
  personList.add(new Person("Bob", new String[]{"ywqyr", "afjfj"}, cities, map));
  personList.add(new Person("Charlie", new String[]{"ywqyr", "afjfj"}, cities, map));
  request.setAttribute("per", personList);
%>

<table border="1">
  <thead>
  <tr>
    <th>User Name</th>
    <th>Age</th>
  </tr>
  </thead>
  <tbody>
  <c:forEach items="${per}" var="person" varStatus="status">
    <tr>
      <td>${person.name}</td>
      <td>${person.phones}</td>
    </tr>
  </c:forEach>
  </tbody>
</table>


</body>
</html>
